<?php
	$id = $_GET['upMesg'];
	$mesg = readMessage($id);
?>
<br/>
<br/>
<div class="rappelInfos"> Modification d'un message </div>
<div class='creation'>
	<form method="post" action="index.php?cat=<?php echo $_GET['cat'] ; ?>&thr=<?php echo $_GET['thr'] ; ?>">
		<input type="hidden" name="modifier_mesg" value="<?php echo $id ; ?>" />
		<fieldset>
			<legend>Titre du message</legend>
			<div>
				<input type="text" name="modifier_mesg_titre" value="<?php echo $mesg['titre']; ?>" />
			</div>
		</fieldset>
		<fieldset>
			<legend>Contenu</legend>
			<div>
				<textarea name="modifier_mesg_contenu" style="width:94%"><?php echo $mesg['contenu']; ?></textarea>
			</div>
		</fieldset>
		<div style = "text-align:center">
		<br/>
			<input type="submit" />
				<input type="button" value="Annuler" onclick='location.href="index.php?cat=<?php echo $_GET['cat'];?>&thr=<?php echo $_GET['thr'];?>"'/>
		</div>
	</form>
</div>
<br/>
<div></div>